package com.spring.shops.model.result;

import com.spring.shops.model.vo.OrderRecordsVo;
import com.spring.shops.model.vo.OrderVo;
import lombok.Data;

@Data
public class OrderResult {
    private String code="00000";
    private String msg=null;
    private Object data;
    private String version="mall4j.v230424";
    private Integer timestamp=null;
    private String sign=null;
    private boolean success=true;
    private boolean fail=true;

    public static OrderResult orderPageSearchSuccess(OrderVo orderVo){
        OrderResult orderResult = new OrderResult();
        orderResult.setFail(false);
        orderResult.setData(orderVo);
        return orderResult;
    }
    public static OrderResult orderInfoSuccess(OrderRecordsVo orderRecordsVo){
        OrderResult orderResult = new OrderResult();
        orderResult.setFail(false);
        orderResult.setData(orderRecordsVo);
        return orderResult;
    }
}
